Explorar o código

db__recv_procnum() shouldn't return DB_OK for errors or short reads

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50496 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements %!s(int64=13) %!d(string=hai) anos
pai
achega
7f98c265a0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/db/dbmi_base/xdrprocedure.c

+ 1 - 1
lib/db/dbmi_base/xdrprocedure.c

@@ -53,7 +53,7 @@ int db__recv_procnum(int *n)
 {
 {
     int stat = DB_OK;
     int stat = DB_OK;
 
 
-    if (!db__recv(n, sizeof(*n)))
+    if (db__recv(n, sizeof(*n)) < sizeof(*n))
 	stat = DB_EOF;
 	stat = DB_EOF;
 
 
     return stat;
     return stat;