Browse Source

ckdb - change errno to errn

master
kanoi 11 years ago
parent
commit
3a6e4a9fcb
  1. 4
      sql/ckdb.sql
  2. 4
      src/ckdb.c

4
sql/ckdb.sql

@ -169,7 +169,7 @@ CREATE TABLE shares ( -- not stored in the db - only in log files
nonce character varying(64) NOT NULL, nonce character varying(64) NOT NULL,
diff float NOT NULL, diff float NOT NULL,
sdiff float NOT NULL, sdiff float NOT NULL,
errno integer NOT NULL, errn integer NOT NULL,
error character varying(64) DEFAULT ''::character varying NOT NULL, -- optional error character varying(64) DEFAULT ''::character varying NOT NULL, -- optional
secondaryuserid character varying(64) NOT NULL, secondaryuserid character varying(64) NOT NULL,
createdate timestamp with time zone NOT NULL, createdate timestamp with time zone NOT NULL,
@ -186,7 +186,7 @@ CREATE TABLE shareerrors ( -- not stored in the db - only in log files
userid bigint NOT NULL, userid bigint NOT NULL,
workername character varying(256) NOT NULL, workername character varying(256) NOT NULL,
clientid integer NOT NULL, clientid integer NOT NULL,
errno integer NOT NULL, errn integer NOT NULL,
error character varying(64) DEFAULT ''::character varying NOT NULL, -- optional error character varying(64) DEFAULT ''::character varying NOT NULL, -- optional
secondaryuserid character varying(64) NOT NULL, secondaryuserid character varying(64) NOT NULL,
createdate timestamp with time zone NOT NULL, createdate timestamp with time zone NOT NULL,

4
src/ckdb.c

@ -2422,7 +2422,7 @@ static bool shareerrors_add(char *workinfoid, char *username, char *workername,
TXT_TO_BIGINT("workinfoid", workinfoid, shareerrors->workinfoid); TXT_TO_BIGINT("workinfoid", workinfoid, shareerrors->workinfoid);
STRNCPY(shareerrors->workername, workername); STRNCPY(shareerrors->workername, workername);
TXT_TO_INT("clientid", clientid, shareerrors->clientid); TXT_TO_INT("clientid", clientid, shareerrors->clientid);
TXT_TO_INT("errno", errn, shareerrors->errn); TXT_TO_INT("errn", errn, shareerrors->errn);
STRNCPY(shareerrors->error, error); STRNCPY(shareerrors->error, error);
STRNCPY(shareerrors->secondaryuserid, secondaryuserid); STRNCPY(shareerrors->secondaryuserid, secondaryuserid);
@ -3484,7 +3484,7 @@ static char *cmd_sharelog(__maybe_unused char *id, tv_t *now, char *by, char *co
if (!i_clientid) if (!i_clientid)
return strdup(reply); return strdup(reply);
i_errn = require_name("errno", 1, NULL, reply, siz); i_errn = require_name("errn", 1, NULL, reply, siz);
if (!i_errn) if (!i_errn)
return strdup(reply); return strdup(reply);

Loading…
Cancel
Save