libpurple/protocols/novell/nmconn.c

branch
string-comparison-r2
changeset 38259
c593fc9f5438
parent 19859
71d37b57eff2
child 38358
30ba44276e74
--- a/libpurple/protocols/novell/nmconn.c	Thu Mar 23 21:01:15 2017 +0300
+++ b/libpurple/protocols/novell/nmconn.c	Fri Mar 24 02:23:46 2017 +0300
@@ -30,6 +30,8 @@
 #include <windows.h>
 #endif
 
+#include "util.h"
+
 #define NO_ESCAPE(ch) ((ch == 0x20) || (ch >= 0x30 && ch <= 0x39) || \
 					(ch >= 0x41 && ch <= 0x5a) || (ch >= 0x61 && ch <= 0x7a))
 
@@ -428,7 +430,7 @@
 
 	/* Write headers */
 	if (rc == NM_OK) {
-		if (strcmp("login", cmd) == 0) {
+		if (purple_strequal("login", cmd)) {
 			bytes_to_send = g_snprintf(buffer, sizeof(buffer),
 									   "Host: %s:%d\r\n\r\n", conn->addr, conn->port);
 			ret = nm_tcp_write(conn, buffer, bytes_to_send);
@@ -524,7 +526,7 @@
 
 	/* Finish reading header, in the future we might want to do more processing here */
 	/* TODO: handle more general redirects in the future */
-	while ((rc == NM_OK) && (strcmp(buffer, "\r\n") != 0)) {
+	while ((rc == NM_OK) && (!purple_strequal(buffer, "\r\n"))) {
 		rc = read_line(conn, buffer, sizeof(buffer));
 	}
 

mercurial