if (!pdb)
return (pid_t)-1;
slprintf(keystr, sizeof(keystr)-1, "UPDATING/%s", sharename);
- key.dptr = keystr;
- key.dsize = strlen(keystr);
+ key = string_tdb_data(keystr);
data = tdb_fetch(pdb->tdb, key);
release_print_db(pdb);
return;
slprintf(keystr, sizeof(keystr)-1, "UPDATING/%s", sharename);
- key.dptr = keystr;
- key.dsize = strlen(keystr);
+ key = string_tdb_data(keystr);
DEBUG(5, ("set_updating_pid: %s updating lpq cache for print share %s\n",
updating ? "" : "not ",
/* store the new queue status structure */
slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", sharename);
- key.dptr = keystr;
- key.dsize = strlen(keystr);
+ key = string_tdb_data(keystr);
status.qcount = qcount;
data.dptr = (char *)&status;
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr)-1, "STATUS/%s", sharename);
- key.dptr = keystr;
- key.dsize = strlen(keystr);
+ key = string_tdb_data(keystr);
+
data = tdb_fetch(pdb->tdb, key);
if (data.dptr) {
if (data.dsize == sizeof(*status)) {