(!1893) dix: write out X_ListInstalledColormaps reply directly
No need for using a complex callback machinery, if we just move the little pieces of byte-swapping directly into the request handler. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									81fb2b054a
								
							
						
					
					
						commit
						a80fdc9c7d
					
				| 
						 | 
					@ -2605,13 +2605,11 @@ ProcListInstalledColormaps(ClientPtr client)
 | 
				
			||||||
        swaps(&rep.sequenceNumber);
 | 
					        swaps(&rep.sequenceNumber);
 | 
				
			||||||
        swapl(&rep.length);
 | 
					        swapl(&rep.length);
 | 
				
			||||||
        swaps(&rep.nColormaps);
 | 
					        swaps(&rep.nColormaps);
 | 
				
			||||||
 | 
					        SwapLongs(cm, nummaps * sizeof(Colormap) / 4);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    WriteToClient(client, sizeof(rep), &rep);
 | 
					    WriteToClient(client, sizeof(rep), &rep);
 | 
				
			||||||
    if (client->swapped)
 | 
					    WriteToClient(client, nummaps * sizeof(Colormap), cm);
 | 
				
			||||||
        Swap32Write(client, nummaps * sizeof(Colormap), cm);
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        WriteToClient(client, nummaps * sizeof(Colormap), cm);
 | 
					 | 
				
			||||||
    free(cm);
 | 
					    free(cm);
 | 
				
			||||||
    return Success;
 | 
					    return Success;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue