|
Lines 27-32
Link Here
|
| 27 |
#include "nmuserrecord.h" |
27 |
#include "nmuserrecord.h" |
| 28 |
#include "nmrtf.h" |
28 |
#include "nmrtf.h" |
| 29 |
|
29 |
|
|
|
30 |
#define MAX_UINT32 0xFFFFFFFF |
| 31 |
|
| 30 |
struct _NMEvent |
32 |
struct _NMEvent |
| 31 |
{ |
33 |
{ |
| 32 |
|
34 |
|
|
Lines 147-152
Link Here
|
| 147 |
|
149 |
|
| 148 |
/* Read the conference guid */ |
150 |
/* Read the conference guid */ |
| 149 |
rc = nm_read_uint32(conn, &size); |
151 |
rc = nm_read_uint32(conn, &size); |
|
|
152 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 153 |
|
| 150 |
if (rc == NM_OK) { |
154 |
if (rc == NM_OK) { |
| 151 |
guid = g_new0(char, size + 1); |
155 |
guid = g_new0(char, size + 1); |
| 152 |
rc = nm_read_all(conn, guid, size); |
156 |
rc = nm_read_all(conn, guid, size); |
|
Lines 160-167
Link Here
|
| 160 |
/* Read the message text */ |
164 |
/* Read the message text */ |
| 161 |
if (rc == NM_OK) { |
165 |
if (rc == NM_OK) { |
| 162 |
rc = nm_read_uint32(conn, &size); |
166 |
rc = nm_read_uint32(conn, &size); |
| 163 |
if (rc == NM_OK) { |
167 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 164 |
|
168 |
|
|
|
169 |
if (rc == NM_OK) { |
| 165 |
msg = g_new0(char, size + 1); |
170 |
msg = g_new0(char, size + 1); |
| 166 |
rc = nm_read_all(conn, msg, size); |
171 |
rc = nm_read_all(conn, msg, size); |
| 167 |
|
172 |
|
|
Lines 265-270
Link Here
|
| 265 |
|
270 |
|
| 266 |
/* Read the conference guid */ |
271 |
/* Read the conference guid */ |
| 267 |
rc = nm_read_uint32(conn, &size); |
272 |
rc = nm_read_uint32(conn, &size); |
|
|
273 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 274 |
|
| 268 |
if (rc == NM_OK) { |
275 |
if (rc == NM_OK) { |
| 269 |
guid = g_new0(char, size + 1); |
276 |
guid = g_new0(char, size + 1); |
| 270 |
rc = nm_read_all(conn, guid, size); |
277 |
rc = nm_read_all(conn, guid, size); |
|
Lines 273-278
Link Here
|
| 273 |
/* Read the the message */ |
280 |
/* Read the the message */ |
| 274 |
if (rc == NM_OK) { |
281 |
if (rc == NM_OK) { |
| 275 |
rc = nm_read_uint32(conn, &size); |
282 |
rc = nm_read_uint32(conn, &size); |
|
|
283 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 284 |
|
| 276 |
if (rc == NM_OK) { |
285 |
if (rc == NM_OK) { |
| 277 |
msg = g_new0(char, size + 1); |
286 |
msg = g_new0(char, size + 1); |
| 278 |
rc = nm_read_all(conn, msg, size); |
287 |
rc = nm_read_all(conn, msg, size); |
|
Lines 340-345
Link Here
|
| 340 |
|
349 |
|
| 341 |
/* Read the conference guid */ |
350 |
/* Read the conference guid */ |
| 342 |
rc = nm_read_uint32(conn, &size); |
351 |
rc = nm_read_uint32(conn, &size); |
|
|
352 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 353 |
|
| 343 |
if (rc == NM_OK) { |
354 |
if (rc == NM_OK) { |
| 344 |
guid = g_new0(char, size + 1); |
355 |
guid = g_new0(char, size + 1); |
| 345 |
rc = nm_read_all(conn, guid, size); |
356 |
rc = nm_read_all(conn, guid, size); |
|
Lines 390-395
Link Here
|
| 390 |
|
401 |
|
| 391 |
/* Read the conference guid */ |
402 |
/* Read the conference guid */ |
| 392 |
rc = nm_read_uint32(conn, &size); |
403 |
rc = nm_read_uint32(conn, &size); |
|
|
404 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 405 |
|
| 393 |
if (rc == NM_OK) { |
406 |
if (rc == NM_OK) { |
| 394 |
guid = g_new0(char, size + 1); |
407 |
guid = g_new0(char, size + 1); |
| 395 |
rc = nm_read_all(conn, guid, size); |
408 |
rc = nm_read_all(conn, guid, size); |
|
Lines 427-432
Link Here
|
| 427 |
|
440 |
|
| 428 |
/* Read the conference guid */ |
441 |
/* Read the conference guid */ |
| 429 |
rc = nm_read_uint32(conn, &size); |
442 |
rc = nm_read_uint32(conn, &size); |
|
|
443 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 444 |
|
| 430 |
if (rc == NM_OK) { |
445 |
if (rc == NM_OK) { |
| 431 |
guid = g_new0(char, size + 1); |
446 |
guid = g_new0(char, size + 1); |
| 432 |
rc = nm_read_all(conn, guid, size); |
447 |
rc = nm_read_all(conn, guid, size); |
|
Lines 475-480
Link Here
|
| 475 |
|
490 |
|
| 476 |
/* Read the conference guid */ |
491 |
/* Read the conference guid */ |
| 477 |
rc = nm_read_uint32(conn, &size); |
492 |
rc = nm_read_uint32(conn, &size); |
|
|
493 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 494 |
|
| 478 |
if (rc == NM_OK) { |
495 |
if (rc == NM_OK) { |
| 479 |
guid = g_new0(char, size + 1); |
496 |
guid = g_new0(char, size + 1); |
| 480 |
rc = nm_read_all(conn, guid, size); |
497 |
rc = nm_read_all(conn, guid, size); |
|
Lines 513-518
Link Here
|
| 513 |
|
530 |
|
| 514 |
/* Read the conference guid */ |
531 |
/* Read the conference guid */ |
| 515 |
rc = nm_read_uint32(conn, &size); |
532 |
rc = nm_read_uint32(conn, &size); |
|
|
533 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 534 |
|
| 516 |
if (rc == NM_OK) { |
535 |
if (rc == NM_OK) { |
| 517 |
guid = g_new0(char, size + 1); |
536 |
guid = g_new0(char, size + 1); |
| 518 |
rc = nm_read_all(conn, guid, size); |
537 |
rc = nm_read_all(conn, guid, size); |
|
Lines 570-575
Link Here
|
| 570 |
|
589 |
|
| 571 |
/* Read the conference guid */ |
590 |
/* Read the conference guid */ |
| 572 |
rc = nm_read_uint32(conn, &size); |
591 |
rc = nm_read_uint32(conn, &size); |
|
|
592 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 593 |
|
| 573 |
if (rc == NM_OK) { |
594 |
if (rc == NM_OK) { |
| 574 |
guid = g_new0(char, size + 1); |
595 |
guid = g_new0(char, size + 1); |
| 575 |
rc = nm_read_all(conn, guid, size); |
596 |
rc = nm_read_all(conn, guid, size); |
|
Lines 611-621
Link Here
|
| 611 |
|
632 |
|
| 612 |
/* Read the status text */ |
633 |
/* Read the status text */ |
| 613 |
rc = nm_read_uint32(conn, &size); |
634 |
rc = nm_read_uint32(conn, &size); |
|
|
635 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 636 |
|
| 614 |
if (rc == NM_OK) { |
637 |
if (rc == NM_OK) { |
| 615 |
if (size > 0) { |
638 |
text = g_new0(char, size + 1); |
| 616 |
text = g_new0(char, size + 1); |
639 |
rc = nm_read_all(conn, text, size); |
| 617 |
rc = nm_read_all(conn, text, size); |
|
|
| 618 |
} |
| 619 |
} |
640 |
} |
| 620 |
} |
641 |
} |
| 621 |
|
642 |
|
|
Lines 649-654
Link Here
|
| 649 |
|
670 |
|
| 650 |
/* Read the conference guid */ |
671 |
/* Read the conference guid */ |
| 651 |
rc = nm_read_uint32(conn, &size); |
672 |
rc = nm_read_uint32(conn, &size); |
|
|
673 |
if (size == MAX_UINT32) return NMERR_PROTOCOL; |
| 674 |
|
| 652 |
if (rc == NM_OK) { |
675 |
if (rc == NM_OK) { |
| 653 |
guid = g_new0(char, size + 1); |
676 |
guid = g_new0(char, size + 1); |
| 654 |
rc = nm_read_all(conn, guid, size); |
677 |
rc = nm_read_all(conn, guid, size); |