| 2107 break; |
2107 break; |
| 2108 |
2108 |
| 2109 default: |
2109 default: |
| 2110 purple_debug_error( MXIT_PLUGIN_ID, "Unknown message event received (%i)\n", event ); |
2110 purple_debug_error( MXIT_PLUGIN_ID, "Unknown message event received (%i)\n", event ); |
| 2111 } |
2111 } |
| 2112 } |
|
| 2113 |
|
| 2114 |
|
| 2115 /*------------------------------------------------------------------------ |
|
| 2116 * Return the length of a multimedia chunk |
|
| 2117 * |
|
| 2118 * @return The actual chunk data length in bytes |
|
| 2119 */ |
|
| 2120 static int get_chunk_len( const char* chunkdata ) |
|
| 2121 { |
|
| 2122 guint32 size_val; |
|
| 2123 |
|
| 2124 /* we skip the first byte (type field) */ |
|
| 2125 memcpy(&size_val, &chunkdata[1], sizeof(size_val)); |
|
| 2126 |
|
| 2127 return ntohl(size_val); |
|
| 2128 } |
2112 } |
| 2129 |
2113 |
| 2130 |
2114 |
| 2131 /*------------------------------------------------------------------------ |
2115 /*------------------------------------------------------------------------ |
| 2132 * Process a received multimedia packet. |
2116 * Process a received multimedia packet. |