diff src/protocols/novell/nmevent.c @ 8874:a2affcdf8e01

[gaim-migrate @ 9643] "This patch fixes the Novell protocol plugin on big endian platforms (Bug #947017). It also includes a fix for disconnects when sending large messages." --Mike Stoddard (novell) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 05 May 2004 20:29:21 +0000
parents 046dd8ef2920
children 6663ad2386d9
line wrap: on
line diff
--- a/src/protocols/novell/nmevent.c	Tue May 04 17:45:59 2004 +0000
+++ b/src/protocols/novell/nmevent.c	Wed May 05 20:29:21 2004 +0000
@@ -207,7 +207,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -215,12 +215,12 @@
 
 	/* Read the conference flags */
 	if (rc == NM_OK) {
-		rc = nm_read_all(conn, (char *) &flags, sizeof(flags));
+		rc = nm_read_uint32(conn, &flags);
 	}
 
 	/* Read the message text */
 	if (rc == NM_OK) {
-		rc = nm_read_all(conn, (char *) &size, sizeof(size));
+		rc = nm_read_uint32(conn, &size);
 		if (rc == NM_OK) {
 
 			msg = g_new0(char, size + 1);
@@ -322,7 +322,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -330,7 +330,7 @@
 
 	/* Read the the message */
 	if (rc == NM_OK) {
-		rc = nm_read_all(conn, (char *) &size, sizeof(size));
+		rc = nm_read_uint32(conn, &size);
 		if (rc == NM_OK) {
 			msg = g_new0(char, size + 1);
 			rc = nm_read_all(conn, msg, size);
@@ -397,7 +397,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -447,7 +447,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -484,7 +484,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -492,7 +492,7 @@
 
 	/* Read the conference flags */
 	if (rc == NM_OK) {
-		rc = nm_read_all(conn, (char *) &flags, sizeof(flags));
+		rc = nm_read_uint32(conn, &flags);
 	}
 
 	if (rc == NM_OK) {
@@ -532,7 +532,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -570,7 +570,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -578,7 +578,7 @@
 
 	/* Read the conference flags */
 	if (rc == NM_OK) {
-		rc = nm_read_all(conn, (char *) &flags, sizeof(flags));
+		rc = nm_read_uint32(conn, &flags);
 	}
 
 	if (rc == NM_OK) {
@@ -625,7 +625,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -662,11 +662,11 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read new status */
-	rc = nm_read_all(conn, (char *) &status, sizeof(status));
+	rc = nm_read_uint16(conn, &status);
 	if (rc == NM_OK) {
 
 		/* Read the status text */
-		rc = nm_read_all(conn, (char *) &size, sizeof(size));
+		rc = nm_read_uint32(conn, &size);
 		if (rc == NM_OK) {
 			if (size > 0) {
 				text = g_new0(char, size + 1);
@@ -704,7 +704,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the conference guid */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		guid = g_new0(char, size + 1);
 		rc = nm_read_all(conn, guid, size);
@@ -864,7 +864,7 @@
 	conn = nm_user_get_conn(user);
 
 	/* Read the event source */
-	rc = nm_read_all(conn, (char *) &size, sizeof(size));
+	rc = nm_read_uint32(conn, &size);
 	if (rc == NM_OK) {
 		if (size > 0) {
 			source = g_new0(char, size);