Browse code

- corrected a typing bug

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@2287 689a6050-402a-0410-94f2-e92a70836424

Anca Vamanu authored on 24/05/2007 16:22:57
Showing 1 changed files
... ...
@@ -1327,10 +1327,12 @@ int handle_subscribe(struct sip_msg* msg, char* str1, char* str2)
1327 1327
 		row = &result->rows[0];
1328 1328
 		row_vals = ROW_VALUES(row);
1329 1329
 		status.len= strlen(row_vals[0].val.string_val);
1330
+			
1330 1331
 		status.s= (char*)pkg_malloc(status.len* sizeof(char));
1331 1332
 		if(status.s== NULL)
1332 1333
 		{
1333
-			LOG(L_ERR, "PRESENCE:handle_subscribe: ERORR No more memory\n");
1334
+			LOG(L_ERR, "PRESENCE:handle_subscribe: ERORR No more memory when"
1335
+					"allocating status\n");
1334 1336
 			pa_dbf.free_result(pa_db, result);
1335 1337
 			goto error;
1336 1338
 		}	
... ...
@@ -1344,9 +1346,10 @@ int handle_subscribe(struct sip_msg* msg, char* str1, char* str2)
1344 1346
 			else
1345 1347
 			{
1346 1348
 				reason.s= (char*)pkg_malloc(reason.len*sizeof(char));
1347
-				if(reason.s)
1349
+				if(reason.s== NULL)
1348 1350
 				{
1349
-					LOG(L_ERR, "PRESENCE:handle_subscribe: ERORR No more memory\n");
1351
+					LOG(L_ERR, "PRESENCE:handle_subscribe: ERORR No more memory"
1352
+							" when allocating reason\n");
1350 1353
 					pa_dbf.free_result(pa_db, result);
1351 1354
 					goto error;		
1352 1355
 				}