Wrapper for feedReplicationBacklog() that takes Redis string objects * as input. */
| 184 | /* Wrapper for feedReplicationBacklog() that takes Redis string objects |
| 185 | * as input. */ |
| 186 | void feedReplicationBacklogWithObject(robj *o) { |
| 187 | char llstr[LONG_STR_SIZE]; |
| 188 | void *p; |
| 189 | size_t len; |
| 190 | |
| 191 | if (o->encoding == OBJ_ENCODING_INT) { |
| 192 | len = ll2string(llstr,sizeof(llstr),(long)o->ptr); |
| 193 | p = llstr; |
| 194 | } else { |
| 195 | len = sdslen(o->ptr); |
| 196 | p = o->ptr; |
| 197 | } |
| 198 | feedReplicationBacklog(p,len); |
| 199 | } |
| 200 | |
| 201 | int canFeedReplicaReplBuffer(client *replica) { |
| 202 | /* Don't feed replicas that only want the RDB. */ |
no test coverage detected