- srs_db_address = string_copyn(data, data_len);
- if(srs_generate_unique_id(srs, srs_db_address, buf, 64) & SRS_RESULT_FAIL)
- return DEFER;
-
- srs_db_key = string_copyn(buf, 16);
-
- if((res = expand_string(srs_db_forward)) == NULL)
- return SRS_RESULT_DBERROR;
-
- if(result_len < 17)
- return SRS_RESULT_DBERROR;
-
- strncpy(result, srs_db_key, result_len);
-
- return SRS_RESULT_OK;
+if (srs_db_forward == NULL)
+ return SRS_RESULT_DBERROR;
+
+srs_db_address = string_copyn(data, data_len);
+if (srs_generate_unique_id(srs, srs_db_address, buf, 64) & SRS_RESULT_FAIL)
+ return SRS_RESULT_DBERROR;
+
+srs_db_key = string_copyn(buf, 16);
+
+if ((res = expand_string(srs_db_forward)) == NULL)
+ return SRS_RESULT_DBERROR;
+
+if (result_len < 17)
+ return SRS_RESULT_DBERROR;
+
+Ustrncpy(result, srs_db_key, result_len);
+
+return SRS_RESULT_OK;