]> git.sur5r.net Git - ngadmin/blobdiff - lib/src/mirror.c
Add error codes to handle bad replies and unknown errors
[ngadmin] / lib / src / mirror.c
index be4073847a7cc435e802cf080dc4b83bbd11d116..8b76c1ce08285ed935c8549e8dc8d7a46db6d742 100644 (file)
@@ -43,7 +43,7 @@ int ngadmin_getMirror (struct ngadmin *nga, char *ports)
                        memset(ports, 0, 1 + sa->ports);
                } else if (am->outport > 0 && at->size >= 1 + sa->ports) {
                        if (at->size < sizeof(struct attr_mirror) + sa->ports) {
-                               ret = ERR_INVARG;
+                               ret = ERR_BADREPLY;
                                goto end;
                        }
                        ports[0] = am->outport;